home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / ptv2n1.arc / BLINKTST.PAS < prev    next >
Pascal/Delphi Source File  |  1991-03-26  |  839b  |  28 lines

  1. PROGRAM BlinkTst;
  2. {===============================================================
  3. BLINKTST.PAS - Demonstrates the effect of the EGA Blink Bit,
  4.                using the "I_PREFER" device (PREFERS.SYS).
  5. ===============================================================}
  6. USES Dos,Crt;
  7.  
  8. CONST
  9.   Toggle : Char = 'b';     {I_PREFER message to toggle blink bit}
  10.  
  11. VAR
  12.   PF : Text;            {Our Preferences device is a "text" type}
  13.   Ch : Char;
  14.  
  15. BEGIN
  16.   ClrScr;
  17.   Assign(PF,'I_PREFER');          {Open the preferences "device"}
  18.   ReWrite(PF);
  19.   TextAttr := $CF;                            {Bold White on Red}
  20.   WriteLn
  21.   ('Press [Esc] to quit; any other key to toggle the blink bit.');
  22.   REPEAT
  23.     Ch := ReadKey;
  24.     Write(PF,Toggle);        {Command device to toggle blink bit}
  25.   UNTIL (Ch = #27);
  26.   Close(PF);
  27. END.
  28.